package marketplace_client;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Set;
import marketplace_server.Item;
import marketplace_server.RejectedException;

public interface Client extends Remote {
    
    
    // A delegate method called from the server to announce items in said price range
    public void serverHasItemInMyPriceRange (ArrayList<Item> items) throws RemoteException;
    
    // A delegate method called from the server to notify the client of currently available items
    public void serverHasItemsAvailable (ArrayList<Item> items) throws RemoteException;
    
    // Server calls this delegate whenever a transaction fails
    public void transactionFailedWithException(String exceptionMessage) throws RemoteException;
    
    // Server calls this delegate when one of the clients items gets sold
    public void itemHasBeenSold (Item item) throws RemoteException;
    
    // Server calls this delegate when it wants to update the balance in the clients gui
    public void updateBalance () throws RemoteException;
   
    
    public String getID() throws RemoteException;
    public void createBankAccount() throws RemoteException;
    public void deposit (float  amount) throws RemoteException, RejectedException;
    public void withdraw (float amount) throws RemoteException, RejectedException;
    

    
    
}